package com.zbs.framework.dao.permission.service.model;

import com.zbs.framework.dao.permission.entity.Permission;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 权限节点
 */
@Getter
@Setter
@NoArgsConstructor
public class PermissionNode{

    private Long id;
    /**
     * 所属服务名
     */
    private String serviceName;
    /**
     * 权限名
     */
    private String name;
    /**
     * 描述
     */
    private String description;
    /**
     * 其他信息
     */
    private String extra;

    public PermissionNode(Permission permission) {
        this.id = permission.getId();
        this.serviceName = permission.getServiceName();
        this.name = permission.getName();
        this.description = permission.getDescription();
        this.extra = permission.getExtra();
    }
}
